package com.innovation.chengzhangriji.ui;

import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;

import com.google.gson.JsonElement;
import com.innovation.chengzhangriji.Config;
import com.innovation.chengzhangriji.R;
import com.innovation.chengzhangriji.http.Client;
import com.innovation.chengzhangriji.http.ResponseHandler;
import com.innovation.chengzhangriji.preferences.LoginInfo;
import com.innovation.chengzhangriji.ui.widget.CuteButton;
import com.innovation.chengzhangriji.ui.widget.CuteEditText;
import com.innovation.chengzhangriji.ui.widget.CuteTextView;
import com.innovation.library.util.InnovationAlgorithm;

public class CancleNoticeDialogActivity extends BaseActivity implements View.OnClickListener {
    private String info;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_canclenotice_dialog);

        CuteButton btnOk = (CuteButton) findViewById(R.id.btn_okforcancle);
        CuteButton btnCancel = (CuteButton) findViewById(R.id.btn_forcancel);
        CuteTextView cuteTextView = (CuteTextView) findViewById(R.id.tv_canclenotice);
        Intent intent = getIntent();
        String name = intent.getStringExtra("name");
        info = intent.getStringExtra("info");
        cuteTextView.setText("作为大家长的您，忍心取消关注\n"+name+"的成长日记吗？");
        btnOk.setOnClickListener(this);
        btnCancel.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_okforcancle:
                Intent intent = new Intent(CancleNoticeDialogActivity.this, ReadytoChangeDialogActivity.class);
                intent.putExtra("info",info);
                startActivity(intent);
                finish();
                break;
            case R.id.btn_forcancel:
                finish();
                break;
        }
    }
}
